package com.ruoyi.system.service.impl;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaWorkerBankCard;
import com.ruoyi.system.mapper.JiajiaWorkerBankCardMapper;
import com.ruoyi.system.service.IJiajiaWorkerBankCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 社工银行卡Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-01
 */
@Service
public class JiajiaWorkerBankCardServiceImpl implements IJiajiaWorkerBankCardService
{
    @Autowired
    private JiajiaWorkerBankCardMapper jiajiaWorkerBankCardMapper;

    /**
     * 查询社工银行卡
     * 
     * @param id 社工银行卡主键
     * @return 社工银行卡
     */
    @Override
    public JiajiaWorkerBankCard selectJiajiaWorkerBankCardById(Long id)
    {
        return jiajiaWorkerBankCardMapper.selectJiajiaWorkerBankCardById(id);
    }

    /**
     * 查询社工银行卡列表
     * 
     * @param jiajiaWorkerBankCard 社工银行卡
     * @return 社工银行卡
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<JiajiaWorkerBankCard> selectJiajiaWorkerBankCardList(JiajiaWorkerBankCard jiajiaWorkerBankCard)
    {
        return jiajiaWorkerBankCardMapper.selectJiajiaWorkerBankCardList(jiajiaWorkerBankCard);
    }

    /**
     * 新增社工银行卡
     * 
     * @param jiajiaWorkerBankCard 社工银行卡
     * @return 结果
     */
    @Override
    public int insertJiajiaWorkerBankCard(JiajiaWorkerBankCard jiajiaWorkerBankCard)
    {
        return jiajiaWorkerBankCardMapper.insertJiajiaWorkerBankCard(jiajiaWorkerBankCard);
    }

    /**
     * 修改社工银行卡
     * 
     * @param jiajiaWorkerBankCard 社工银行卡
     * @return 结果
     */
    @Override
    public int updateJiajiaWorkerBankCard(JiajiaWorkerBankCard jiajiaWorkerBankCard)
    {
        return jiajiaWorkerBankCardMapper.updateJiajiaWorkerBankCard(jiajiaWorkerBankCard);
    }

    /**
     * 批量删除社工银行卡
     * 
     * @param ids 需要删除的社工银行卡主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerBankCardByIds(String ids)
    {
        return jiajiaWorkerBankCardMapper.deleteJiajiaWorkerBankCardByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除社工银行卡信息
     * 
     * @param id 社工银行卡主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaWorkerBankCardById(Long id)
    {
        return jiajiaWorkerBankCardMapper.deleteJiajiaWorkerBankCardById(id);
    }
}
